<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * @author CHUN Dany <chundany@gmail.com>
 */
class Index extends Admin_Controller
{
  function __construct()
  {
    parent::__construct();
    $this->load->model(array('mod_index'));
  }
  
  public function view()
  {
    $this->today = null;
    $this->tomorrow = null;
    $this->yesterday = null;
    
    $this->comments = null;
    
    $this->title  = 'Dashboard';
    $this->action = 'Dashboard';
  }

  // enable route for using
  public function json()
  {
    // set layout by default null
    $this->setLayout(NULL);

    // set view by default null
    // $this->setView(NULL);
    $data = array('name' => 'hello', 'id' => 'test');
    $this->output->set_content_type('application/json')->set_output(json_encode($data));
  }
}